<%@ page language="java" import="java.util.*, JavaBean.two_data"
	pageEncoding="UTF-8"%>

<html>
<head>

<title>图书信息管理系统</title>

</head>

<body>


	<h3 style="margin-top: 100px; text-align: center;">显示信息</h3>
	<table style="margin: 10px auto;">

		<%
			if (request.getAttribute("i") != null) {
		%>
		<tr>
			<td><%=request.getAttribute("i")%></td>
		</tr>
		<%
			}
		%>
		<%
			if (request.getAttribute("d") != null) {
		%>
		<tr>
			<td><%=request.getAttribute("d")%></td>
		</tr>
		<%
			}
		%>
		<%
			if (request.getAttribute("u") != null) {
		%>
		<tr>
			<td><%=request.getAttribute("u")%></td>
		</tr>
		<%
			}
		%>
		<%
			if (request.getAttribute("s1") != null) {
		%>
		<%
			if (request.getAttribute("s1").equals("查询失败")) {
		%>
		<tr>
			<td><%=request.getAttribute("s1")%></td>
		</tr>
		<%
			} else {
		%>

		<tr>
			<td style="width: 100px; font-size: 20px;">图书号</td>
			<td style="width: 180px; font-size: 20px;">图书名</td>
			<td style="width: 100px; font-size: 20px;">作者</td>
			<td style="width: 50px; font-size: 20px;">价格</td>
		</tr>
		<tr>
			<td><%=request.getAttribute("s1")%></td>
			<td><%=request.getAttribute("s2")%></td>
			<td><%=request.getAttribute("s3")%></td>
			<td><%=request.getAttribute("s4")%></td>
		</tr>
		<%
			}
		%>
		<%
			}
		%>
		<%
			if (request.getAttribute("all") != null) {
				if (request.getAttribute("all").equals("查询失败")) {
		%>
		<%=request.getAttribute("all")%>
		<%
			} else {
					List<two_data> list = new ArrayList<two_data>();
					list = (List<two_data>) request.getAttribute("all");
		%>
		<tr>
			<td style="width: 100px; font-size: 20px;">图书号</td>
			<td style="width: 180px; font-size: 20px;">图书名</td>
			<td style="width: 100px; font-size: 20px;">作者</td>
			<td style="width: 50px; font-size: 20px;">价格</td>
		</tr>
		<%
			for (two_data item : list) {
		%>
		<tr>
			<td><%=item.getBook_launch()%></td>
			<td><%=item.getBook()%></td>
			<td><%=item.getAuthor()%></td>
			<td><%=item.getPrice()%></td>
		</tr>
		<%
			}
				}
		%>
		<%
			}
		%>
	</table>
</body>
</html>
